import java.util.*;

public class TestJIHeCountlist {
    public static void main(String[] args) {

        ArrayList<String> arrayList = new ArrayList<>();
        List<String> list = Collections.synchronizedList(new ArrayList<>());

        for (int i = 0; i <30 ; i++) {
            new Thread(()->{
                list.add(UUID.randomUUID().toString().substring(0, 8));
                System.out.println(list);
            },String.valueOf(i)).start();

        }
    }
}
